package com.duobaoyu.dby.supply.biz.client.boundary.refund;

import com.duobaoyu.dby.channel.boundary.bean.refund.param.AfterSaleAttributesParam;
import com.duobaoyu.dby.channel.boundary.bean.refund.param.AfterSaleVoucherParam;
import com.duobaoyu.dby.channel.boundary.bean.refund.result.*;
import com.duobaoyu.dby.supply.biz.client.boundary.order.bean.bo.OrderBO;
import com.duobaoyu.dby.supply.biz.client.boundary.order.bean.bo.OrderProductBO;
import com.duobaoyu.dby.supply.biz.client.boundary.refund.bo.AfterSaleLogisticsBO;
import com.duobaoyu.dby.supply.common.biz.bo.refund.AfterSaleOutBO;
import com.duobaoyu.dby.supply.common.biz.bo.refund.AfterSalePickUpBO;
import com.duobaoyu.dby.supply.common.biz.bo.refund.AfterSaleReturnShipmentBO;
import com.duobaoyu.dby.supply.common.biz.bo.refund.AfterSaleWayBillInBO;
import com.duobaoyu.dby.supply.common.biz.bo.refund.client.AfterSaleApplyClientOutBO;

import java.util.List;

/**
 * Created by shuming on 2023/10/27 13:59
 */
public interface AfterSaleBoundaryClient {

    /**
     * 查询售后支持的物流公司
     *
     * @param channelCode
     * @param afterSaleSn
     * @param channelOrderSn
     * @return
     */
    AfterSaleLogisticsBO queryAfterSaleLogistics(String channelCode,
                                                 String afterSaleSn,
                                                 String channelOrderSn);

    /**
     * 取消售后
     *
     * @param afterSale
     * @param cancelRemark
     * @return
     */
    RefundCancelResult cancelOrder(AfterSaleOutBO afterSale, String cancelRemark);

    /**
     * 确认售后
     *
     * @param afterSale
     * @return
     */
    AfterSaleConfirmResult confirmAfterSale(AfterSaleOutBO afterSale);

    /**
     * 售后退款详情
     *
     * @param afterSale
     * @return
     */
    AfterSaleRefundDetailResult jdVopAfterSaleRefundDetail(AfterSaleOutBO afterSale);

    /**
     * 查询售后原因
     *
     * @param order
     * @param orderProducts
     * @return
     */
    List<AfterSaleAttributesResult> queryAfterSaleReason(OrderBO order, List<OrderProductBO> orderProducts);

    /**
     * 售后寄回地址查询
     *
     * @param afterSales
     * @return
     */
    List<AfterSaleReturnAddressResult> afterSaleAddressQuery(List<AfterSaleOutBO> afterSales);

    /**
     * 查询售后权益
     * @param params
     * @return
     */
    List<AfterSaleAttributesResult> afterSaleAttributesQuery(List<AfterSaleAttributesParam> params);

    /**
     * 回填运单信息
     * @param item
     * @param waybill
     * @return
     */
    AfterSaleWayBillResult backFillWaybill(AfterSaleOutBO item, AfterSaleWayBillInBO
            waybill);

    /**
     * 上传附件
     * @param param
     * @return
     */
    AfterSaleVoucherResult afterSaleVoucher(AfterSaleVoucherParam param);

    /**
     * 售后详情
     * @param afterSale
     * @return
     */
    AfterSaleParticularResult queryAfterSale(AfterSaleOutBO afterSale);

    /**
     * 取消售后
     * @param afterSale
     * @return
     */
    AfterSaleApplyClientOutBO cancelOrder(AfterSaleOutBO afterSale);


    /**
     * 申请售后
     * @param afterSale
     * @param afterSalePickUp
     * @param returnShipment
     * @return
     */
    AfterSaleApplyClientOutBO applyAfterSale(AfterSaleOutBO afterSale,
                                             AfterSalePickUpBO afterSalePickUp,
                                             AfterSaleReturnShipmentBO returnShipment);
}
